package com.dragon.lib_mvi.base

import android.os.Bundle
import android.view.View
import com.dragon.lib_mvi.IView

/***
 * @ClassName BaseMVIFragment
 * @Author Administrator
 * @description
 * @date 2025/2/24
 */
abstract class BaseMVIFragment : BaseLazyLoadFragment(), IView {
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        generateViewModel()
    }

    override fun onResume() {
        super.onResume()
        handleState()
    }

    /**
     * 创建viewmodel
     */
    abstract fun generateViewModel()
}